package com.sservice.service.service.impl;

import com.sservice.model.dao.IAuthDao;
import com.sservice.service.service.IAuthService;
import com.sservice.urp.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * Created by suweiming on 2017/12/20.
 */


@Service
public class AuthServiceImpl implements IAuthService {

    @Autowired
    private IAuthDao authDao;

    @Override
    public User getByPhone(String phone) {
        return authDao.getByPhone(phone);
    }

    public User getByUsername(String username) {
        return authDao.getByUsername(username);
    }

    public Set<String> getRoles(String username) {
        return authDao.getRoles(username);
    }

    public Set<String> getPermissions(String username) {
        return authDao.getPermissions(username);
    }
}
